
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(TestRectangle)
{
	TEST("should be able to get area: area=2*3=6")
	{
		Rectangle rectangle(2,3);
		ASSERT_EQ(6, rectangle.getArea());
	}

	TEST("should be able to get perimeter: perimeter=(2+3)*2=10")
	{
		Rectangle rectangle(2,3) ;
		ASSERT_EQ(10, rectangle.getPerimeter());
	}
	
	TEST("should be able to set length")
	{
		Rectangle rectangle(2,3) ;
		rectangle.setLength(4) ;
		ASSERT_EQ(14, rectangle.getPerimeter());
	}

	TEST("should be able to set width")
	{
		Rectangle rectangle(2,3) ;
		rectangle.setWidth(4) ;
		ASSERT_EQ(12, rectangle.getPerimeter());
	}

};
